Repository navigation
Conversation
unused_workspace_dependencies is a Cargo lint, so its level belongs in [workspace.lints.cargo]. Under [workspace.lints.rust] and [workspace.lints.clippy], Cargo passed it to rustc and Clippy as -A unused_workspace_dependencies and -A clippy::unused_workspace_dependencies, which each crate reported as E0602 (unknown lint). The [lints] entry in .cargo/config.toml did not set the level either, so Cargo 1.100 still printed 73 "unused workspace dependency" warnings for the workspace. The allow now sits in [workspace.lints.cargo], which every member inherits through [lints] workspace = true, and .cargo/config.toml is removed. On Cargo 1.100, cargo check --workspace --tests prints no E0602 and no unused workspace dependency warnings. Cargo 1.95 accepts the table but reports lints.cargo as an unused manifest key. https://doc.rust-lang.org/cargo/reference/lints.html#unused_workspace_dependencies https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
unused_workspace_dependenciesis a Cargo lint, but the rootCargo.tomlset it under[workspace.lints.rust]and[workspace.lints.clippy]. Cargo passed those entries to rustc and Clippy as-A unused_workspace_dependenciesand-A clippy::unused_workspace_dependencies, and every crate reportedwarning[E0602]: unknown lint. The[lints]entry in.cargo/config.tomldid not set the level either: Cargo 1.100 still printed 73 "unused workspace dependency" warnings.This moves the allow into a new
[workspace.lints.cargo]table and removes it from the rust and clippy tables. Cargo's lint reference says "Cargo lints can be configured in the [lints.cargo] table of the Cargo.toml manifest" (https://doc.rust-lang.org/cargo/reference/lints.html#unused_workspace_dependencies), and members inheritworkspace.lintsthrough[lints] workspace = true(https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table). All 133crates/*/Cargo.tomlfiles keep[lints] workspace = true..cargo/config.toml, which held only that[lints]entry, is removed.Cargo 1.95 (the workspace
rust-version) accepts the table but prints unused manifest keylints.cargoonce per manifest, since[lints.cargo]was stabilized in Cargo 1.100 (https://doc.rust-lang.org/cargo/reference/unstable.html#lintscargo). The MSRV job runscargo checkwithout-D warnings, so it still passes.Testing
Base:
b77af389, which is currentmain; the branch merges into it cleanly.cargo check --workspace --tests --locked(Cargo 1.100.0), before: 73 unused workspace dependency warnings, and 397 compiled targets (lib, test and build-script units) each reported the E0602 warning. After: none of either; the other warnings are unchanged.cargo clippy --workspace --all-targets --locked -- -D warnings(1.100.0): passes, no E0602.cargo check --workspace --lib --all-features --locked(1.95.0): passes, no E0602, 135 unused manifest keylints.cargowarnings.cargo fmt --all -- --check: passes.Summary by CodeRabbit